package com.ruoyi.fapp.service.impl;


import com.ruoyi.common.core.domain.model.LoginBody;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.fapp.model.LoginUserResp;
import com.ruoyi.fapp.service.AppAccountService;
import com.ruoyi.fapp.service.AppSysService;
import com.ruoyi.framework.web.service.SysLoginService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AppSysServiceImpl implements AppSysService {



     @Autowired
     private SysLoginService loginService;


     @Override
     public LoginUserResp appSyslogin(LoginBody loginBody) {

          LoginUser login = loginService.login(loginBody.getUsername(), loginBody.getPassword());


          //todo 根据需求返回吧
          LoginUserResp loginUserResp = new LoginUserResp();

          BeanUtils.copyProperties(login, loginUserResp);


          return loginUserResp;

     }

     @Override
     public void appSysloginregister(LoginBody loginBody) {

     }

     @Override
     public void appSysloginlogout() {

     }

     @Override
     public void appSysloginforget(LoginBody loginBody) {

     }
}
